package com.joysuch.wwyt.attendance.bean;

import lombok.Data;

import java.util.Calendar;

/**
 * @Author ZhaoQiuWei
 * @Date 2022/5/31 13:26
 */
@Data
public class AttendanceApiUserBean {

    private Integer year;
    private Integer month;
    private Integer day;
    private Integer hour;
    private Integer minute;

    public AttendanceApiUserBean(Integer year, Integer month, Integer day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }


    public AttendanceApiUserBean() {

    }

    public AttendanceApiUserBean(Calendar calendar) {
        this.year = calendar.get(Calendar.YEAR);
        this.month = calendar.get(Calendar.MONTH) + 1;
        this.day = calendar.get(Calendar.DATE);
        this.hour = calendar.get(Calendar.HOUR_OF_DAY);
        this.minute = calendar.get(Calendar.MINUTE);
    }
}
